package com.ruixi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruixi.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Created by lrzg
 * @Date 2022/8/10 13:54
 * @Description TODO
 */
@Repository   //告诉容器你是持久层的 @Repository是spring提供的注释，能够将该类注册成Bean
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user")
    List<User> getAllList();

    User getUserById(@Param("id") int id);
}
